package com.ruoyi.hatha.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hatha.mapper.PYueMapper;
import com.ruoyi.hatha.domain.PYue;
import com.ruoyi.hatha.service.IPYueService;

/**
 * 钱包余额Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-03
 */
@Service
public class PYueServiceImpl implements IPYueService 
{
    @Autowired
    private PYueMapper pYueMapper;

    /**
     * 查询钱包余额
     * 
     * @param id 钱包余额主键
     * @return 钱包余额
     */
    @Override
    public PYue selectPYueById(Long id)
    {
        return pYueMapper.selectPYueById(id);
    }

    /**
     * 查询钱包余额列表
     * 
     * @param pYue 钱包余额
     * @return 钱包余额
     */
    @Override
    public List<PYue> selectPYueList(PYue pYue)
    {
        return pYueMapper.selectPYueList(pYue);
    }

    /**
     * 新增钱包余额
     * 
     * @param pYue 钱包余额
     * @return 结果
     */
    @Override
    public int insertPYue(PYue pYue)
    {
        pYue.setCreateTime(DateUtils.getNowDate());
        return pYueMapper.insertPYue(pYue);
    }

    /**
     * 修改钱包余额
     * 
     * @param pYue 钱包余额
     * @return 结果
     */
    @Override
    public int updatePYue(PYue pYue)
    {
        return pYueMapper.updatePYue(pYue);
    }

    /**
     * 批量删除钱包余额
     * 
     * @param ids 需要删除的钱包余额主键
     * @return 结果
     */
    @Override
    public int deletePYueByIds(Long[] ids)
    {
        return pYueMapper.deletePYueByIds(ids);
    }

    /**
     * 删除钱包余额信息
     * 
     * @param id 钱包余额主键
     * @return 结果
     */
    @Override
    public int deletePYueById(Long id)
    {
        return pYueMapper.deletePYueById(id);
    }

    @Override
    public PYue getCount(PYue pYue) {
        return pYueMapper.getCount(pYue);
    }
}
